import request from '@/utils/request'

// 查询试卷答案列表
export function listAnswer(query) {
  return request({
    url: '/system/answer/list',
    method: 'get',
    params: query
  })
}

// 查询试卷答案列表
export function listStatisticsAnswer(query) {
  return request({
    url: '/system/answer/statistics/list',
    method: 'get',
    params: query
  })
}

// 查询试卷答案列表
export function listStatisticsSchoolAnswer(query) {
  return request({
    url: '/system/answer/statistics/school/list',
    method: 'get',
    params: query
  })
}

export function listAnswerByPaperId(examPaperId) {
  return request({
    url: '/system/answer/getExamPaperTypeStatistics/'+ examPaperId,
    method: 'get'
  })
}

export function listAnswerStatistics(query) {
  return request({
    url: '/system/answer/getExamPaperTypeStatistics',
    method: 'get',
    params: query
  })
}




// 查询试卷答案详细
export function getAnswer(id) {
  return request({
    url: '/system/answer/' + id,
    method: 'get'
  })
}

// 新增试卷答案
export function addAnswer(data) {
  return request({
    url: '/system/answer',
    method: 'post',
    data: data
  })
}

// 修改试卷答案
export function updateAnswer(data) {
  return request({
    url: '/system/answer',
    method: 'put',
    data: data
  })
}

// 删除试卷答案
export function delAnswer(id) {
  return request({
    url: '/system/answer/' + id,
    method: 'delete'
  })
}
